package com.example.demo.mapper;

import com.example.demo.pojo.AttenRecorder;
import com.example.demo.pojo.Rewar_Punish;
import com.example.demo.pojo.TrainingRecorder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface RecorderMappper {

    List<AttenRecorder> getAllAtten();

    void addAtten(@Param("attenRecorder")AttenRecorder attenRecorder);
    void deleteAttById(@Param("id") int id);
    AttenRecorder getAttenById(@Param("id")int id);
    void updateAtten(@Param("attenRecorder")AttenRecorder attenRecorder);


    List<Rewar_Punish> getAllR_P();

    void addRe(@Param("rewar_punish")Rewar_Punish rewar_punish);
    void deleteReById(@Param("id") int id);
    Rewar_Punish getReById(@Param("id")int id);
    void updateRe(@Param("rewar_punish")Rewar_Punish rewar_punish);


    List<TrainingRecorder> getAllTrain();

    void addTra(@Param("trainingRecorder")TrainingRecorder trainingRecorder);
    void deleteTraById(@Param("id") int id);
    TrainingRecorder getTrainById(@Param("id")int id);
    void updateTrain(@Param("trainingRecorder")TrainingRecorder trainingRecorder);


    List<TrainingRecorder> selectTrainingRecorderByConditions(@Param("text") String conditionText,
                                                              @Param("type") String conditionType,
                                                              @Param("startTime") Date startTime,
                                                              @Param("endTime") Date endTime);

    List<Rewar_Punish> getRewardsByConditions(@Param("text")String conditionText, @Param("type") String conditionType);
}
